=over

=item chop VARIABLE
X<chop>

=item chop( LIST )

=item chop

Chops off the last character of a string and returns the character
chopped.  It is much more efficient than C<s/.$//s> because it neither
scans nor copies the string.  If VARIABLE is omitted, chops
L<C<$_>|perlvar/$_>.
If VARIABLE is a hash, it chops the hash's values, but not its keys,
resetting the L<C<each>|/each HASH> iterator in the process.

You can actually chop anything that's an lvalue, including an assignment.

If you chop a list, each element is chopped.  Only the value of the
last L<C<chop>|/chop VARIABLE> is returned.

Note that L<C<chop>|/chop VARIABLE> returns the last character.  To
return all but the last character, use C<substr($string, 0, -1)>.

See also L<C<chomp>|/chomp VARIABLE>.

=back